package com.etone.smartAudit.controller;

import com.etone.smartAudit.service.ItemTypeService;
import com.etone.smartAudit.vo.PagerVO;
import com.etone.smartAudit.vo.itemType.ItemTypeSimpleVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: sovy
 * @date: 2020/9/21
 * @description:
 */
@AllArgsConstructor
@RestController
@Api(tags = "项目类型管理", value = "ItemTypeController")
public class ItemTypeController {

    private ItemTypeService itemTypeService;

    @ApiOperation(value = "项目类型基本信息列表《完》")
    @GetMapping("/itemTypes/simple")
    public PagerVO<ItemTypeSimpleVO> listItemVOSimpleList(
            @ApiParam(value = "当前页") @RequestParam(required = false, defaultValue = "1") int page,
            @ApiParam(value = "每页显示数量") @RequestParam(required = false, defaultValue = "10") int pageSize
    ) {
        return itemTypeService.listItemVOSimpleList(page, pageSize);
    }
}
